package com.vn.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="Storage")
public class Storage implements java.io.Serializable{
	
	@Id
	@Column(name="FolderName")
	private String folderName;
	
	@Column(name="DateCreate",columnDefinition="datetime default CURRENT_TIMESTAMP")
	private Date dateCreate=new Date();


	public String getFolderName() {
		return folderName;
	}

	public void setFolderName(String folderName) {
		this.folderName = folderName;
	}

	public Date getDateCreate() {
		return dateCreate;
	}

	public void setDateCreate(Date dateCreate) {
		this.dateCreate = dateCreate;
	}

	@OneToMany
	private List<Location> locations;
	
	@OneToMany
	private List<Building> buildings; 

	@OneToMany
	private List<Land> lands;
	
	@OneToMany
	private List<Compartment> compartments;
	
	@OneToMany
	private List<Customer> customers;
	
	@OneToMany
	private List<PurchaseContract> purchaseContracts;
	
	public List<Location> getLocations() {
		return locations;
	}

	public void setLocations(List<Location> locations) {
		this.locations = locations;
	}

	public List<Building> getBuildings() {
		return buildings;
	}

	public void setBuildings(List<Building> buildings) {
		this.buildings = buildings;
	}

	public List<Land> getLands() {
		return lands;
	}

	public void setLands(List<Land> lands) {
		this.lands = lands;
	}

	public List<Compartment> getCompartments() {
		return compartments;
	}

	public void setCompartments(List<Compartment> compartments) {
		this.compartments = compartments;
	}

	public List<Customer> getCustomers() {
		return customers;
	}

	public void setCustomers(List<Customer> customers) {
		this.customers = customers;
	}

	public List<PurchaseContract> getPurchaseContracts() {
		return purchaseContracts;
	}

	public void setPurchaseContracts(List<PurchaseContract> purchaseContracts) {
		this.purchaseContracts = purchaseContracts;
	}

	
}
